﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class HouseKeep_ManageMaster : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        lblshowtime.Text = "今天是：" + DateTime.Now.ToString("yyyy年MM月dd日");
        if (Session["UserName"] != null && Session["UserType"].ToString() == "辖区房管所")////需要验证是否是管理员账号
        {
            lblusername.Text = Session["UserName"].ToString();
            lblstreet.Text = Session["UserStreet"].ToString() + Session["UserType"].ToString().Substring(2, 3);
            //lblusertype.Text = Session["UserType"].ToString();
        }
        else
        {
            Response.Redirect("../Login.aspx");
        }
        if (Session["IsAdmin"] != null)
            if (Session["IsAdmin"].ToString() == "true")
            {
                lkbback2center.Visible = true;
                canback.Visible = true;
            }
    }
    protected void lkbback2center_Click(object sender, EventArgs e)
    {
        Session["UserType"] = "住房保障管理中心";
        Session["UserStreet"] = "海曙";
        Session.Remove("IsAdmin");
        Response.Redirect("../ManageCenter/Index.aspx");
    }
}
